package com.ternnetwork.wechat.controller.qy.agent;

import java.io.PrintWriter;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ternnetwork.wechat.service.qy.agent.WechatAgentService;

@Controller@Scope("prototype")
@RequestMapping("/wechat/qy/agent/*")
public class WechatAgentController {

	@Resource
	private WechatAgentService wechatAgentService;
	
	
	@RequestMapping(value="list.htm")
	public void list(PrintWriter out,HttpServletResponse response){
		try{
			response.setContentType("text/javascript");
			String respMessage =wechatAgentService.list();
			out.print(respMessage);
		}catch(Exception e){
			e.printStackTrace();
			out.print(e.getMessage());
		}
	}
}
